/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package plash.display;

import plash.events.Event;
import plash.events.IEventListener;
import plash.geom.Rectangle;
import processing.core.PFont;
import processing.core.PGraphics;

/**
 *
 * @author #0K Srinivasan <hashok.com>
 */
public interface IStage
{
    public void draw();

    public void mousePressed();

    public void mouseReleased();

    public void mouseDragged();

    public void mouseMoved();

    public DisplayObject addChild(DisplayObject child);

    public DisplayObject removeChild(DisplayObject child);

    public DisplayObject getChildByName(String searchName);

    public DisplayObject getChildByIndex(int index) throws IndexOutOfBoundsException;

    public boolean contains(DisplayObject toSearch);

    public int getWidth();

    public int getHeight();

    public int getBackgroundColor();

    public Rectangle getStageSize();

    public PGraphics getStagePainter();

    public PGraphics getMaskablePainter();

    public PGraphics getMaskingPainter();
    
    public PGraphics getTempPainter();
    
    public int getMouseX();
    
    public int getMouseY();
    
    public void registerMethod(String methodName, Object target);
    public void unregisterMethod(String methodName, Object target);
    
    public PFont createFont(String name, int size, boolean smooth);
    
    public void addEventListener(String name, IEventListener listener);

    public void removeEventListener(String name, IEventListener listener);

    public void dispatchEvent(Event e);
}
